<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>米尔豪斯酒店后台管理系统</title>
	<link rel="stylesheet" type="text/css" href="../css/consult_editor.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<script type="text/javascript" language="javascript">
		function confirmAct() {
		   if(confirm('确定要退出登陆吗?') == true) {
		   	　window.location.href="../html/admin_login.html";
   			}
		}
	</script>
</head>
<body>
	<div class="all">	
		<div class="all1">
			<h1>米尔豪斯酒店后台管理系统</h1>
		</div>

        <?php include './menu.php'?>

		<div class="all3" >
			<div class="guide">
				<p><img src="../img/主页.png">&nbsp;&nbsp;当前位置 ： 后台管理 > 留言管理 > 编辑</p>
			</div>
			<div class="change">
		<?php
			session_start();
        	header("Content-type:text/html;charset=utf-8"); 

        	$consult_id = $_GET['consult_id'];

        $conn = 	$conn = mysqli_connect('127.0.0.1','root','pwd','admin',3306);//链接数据库('127.0.0.1','root','pwd','admin',3306);//链接数据库
			mysqli_set_charset($conn,'utf8');

			$sql_select = "select id,user_name,content,createtime from liuyan where id='{$consult_id}'";
	        $stmt=mysqli_query($conn,$sql_select);
	        $row=mysqli_fetch_assoc($stmt);
	        $_SESSION['ID'] = $consult_id;
	    ?>	

	    	<form action="consult_change.php" method="post">
	    		<p><span>用户名&nbsp;&nbsp;&nbsp;&nbsp;：&nbsp;</span><input type="text" name="name" id="name" value="<?php echo $row['user_name'] ?>" class="change1"></p>
	    		<p><span>留言时间&nbsp;：&nbsp;</span><input type="text" name="createtime" id="createtime" value="<?php echo $row['createtime'] ?>" class="change1"></p>
	    		<p><span>留言内容&nbsp;：&nbsp;</span><textarea rows="5" cols="80" name="content" id="content"><?php echo $row['content'] ?></textarea></p>
	    		<input type="submit" name="change" value="修改" class="sublime">
	    	</form>
			</div>
		</div>
		<div class="all4">
			<h3>米尔豪斯酒店</h3>
		</div>
	</div>
</body>
</html>